package com.example.controller;

import com.example.domain.Person;
import com.example.domain.Y;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

@Controller
public class ShowController {

    @RequestMapping("/show")
    public String show(Model model){
        List<Person> list = new ArrayList<>();

        Y y = new Y("yyyyy", "/img/y.gif");
        list.add(y);

        model.addAttribute("list", list);
        return "show";
    }

}
